package com.hmy.finance.api.bo.core.request.receiptOffset;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hmy.ccp.common.request.BaseRequest;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;


@Data
public class ReceiptOffsetBillCreateRequest extends BaseRequest {


    /**
     * 客户id
     */
    @NotNull(message = "客户id不能为空")
    private Long customerId;

    /**
     * 客户名称
     */
    @NotNull(message = "客户名称不能为空")
    private String customerName;

//    /**
//     * 销售经理
//     */
//    private Long saleManagerId;

    /**
     * 联系人
     */
    @NotNull(message = "联系人不能为空")
    private List<CustomerContactorRequest> customerContactors;

    /**
     * 收款日期
     */
    @NotNull(message = "收款日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiptedTime;

    /**
     * 收款金额
     */
    @NotNull(message = "收款金额不能为空")
    private BigDecimal receiptedAmount;

    /**
     * 收款类型code:
     * 10:银行转账
     */
    @NotNull(message = "收款类型不能为空")
    private Integer receiptedType;

    /**
     * 凭证信息
     */
    @NotNull(message = "凭证信息不能为空")
    private ReceiptVoucherRequest receiptVoucher;

    /**
     * 客户总欠款金额
     */
    @NotNull(message = "客户总欠款金额不能为空")
    private BigDecimal customerTotalArrearsAmount;

    /**
     * 客户本次核销金额(此核销单核销金额)
     */
    @NotNull(message = "客户本次核销金额不能为空")
    private BigDecimal customerOffsetAmount;

    /**
     * 客户核销后总欠款金额
     */
    @NotNull(message = "客户核销后总欠款金额不能为空")
    private BigDecimal customerArrearsAmountAfterOffset;

    /**
     * 客户账户余额
     */
    @NotNull(message = "客户账户余额不能为空")
    private BigDecimal customerBalanceAmount;

    /**
     * 联系人分摊明细
     */
    @NotNull(message = "联系人分摊明细不能为空")
    private List<ContactorApportionRequest> contactorApportionInfos;

    /**
     * 备注
     */
    private String remarks;


}
